package de.cachaca.lildancefreak.pierre;

public class UtilPierre {

	public static char[] reverse(char[] word) {
		char[] result = new char[word.length];
		
		for (int i = 0; i < word.length; i++) {
			result[i] = word[word.length - i - 1];
		}
		
		return result;
	}

	public static String reverse(String word) {
		String result = "";
		
		for (int i = 0; i < word.length(); i++) {
			result = result + word.charAt(word.length() - i - 1);
		}
		
		return result;
	}

	public static int[][] createKleinesEinmalEinsMatrix() {
		int[][] result = new int[11][11];
		for (int i = 0; i < 11; i++) {
			for (int j = 0; j < 11; j++) {
				result[i][j] = i * j;
			}
		}
				
		return result;
	}

	public static boolean isPalindrom(char[] word) {
		for (int i = 0; i < word.length; i++) {
			if (word[i] == word[word.length - i - 1]) {
				
			}
			
		}
		return true;
	}

}
